<script>
	import {
		mapMutations
	} from 'vuex'



	// import {
	// 	TUILogin
	// } from "@tencentcloud/tui-core";
	import hrkConfig from '@/config/index';

	export default {
		data() {
			return {
				timer: null
			}
		},
		onLaunch: function(e) {
			console.log('App Launch')
			// let data = uni.getDeviceInfo()
			// console.log(data)
			//#ifdef APP-PLUS
			// plus.navigator.closeSplashscreen()
			// plus.screen.lockOrientation("portrait-primary");
			//#endif
			uni.onTabBarMidButtonTap(() => {
				this.SET_TABBAR_POPUP_SHOW(true)
				// uni.navigateTo({
				//   url: '/pages/release/release',
				// });
			})
			
			// TUILogin.login({
			// 	SDKAppID: uni.$chat_SDKAppID,
			// 	userID: uni.$chat_userID,
			// 	// UserSig 是用户登录即时通信 IM 的密码，其本质是对 UserID 等信息加密后得到的密文。
			// 	// 该方法仅适合本地跑通 Demo 和功能调试，详情请参见 https://cloud.tencent.com/document/product/269/32688     
			// 	userSig: uni.$chat_userSig,
			// 	// 如果您需要发送图片、语音、视频、文件等富媒体消息，请设置为 true
			// 	useUploadPlugin: true,
			// 	// 本地审核可识别、处理不安全、不适宜的内容，为您的产品体验和业务安全保驾护航
			// 	// 此功能为增值服务，请参考：https://cloud.tencent.com/document/product/269/79139
			// 	// 如果您已购买内容审核服务，开启此功能请设置为 true
			// 	useProfanityFilterPlugin: false,
			// 	framework: `vue${vueVersion}` // 当前开发使用框架 vue2 / vue3
			// });

		},
		onShow: function() {
			console.log('App Show')
			// let userInfo = JSON.parse(uni.getStorageSync('user') || "{}")
			// console.log(111, userInfo)
			// if (userInfo.id) {
			// this.getNewerVersion();
			// }
			setTimeout(() => {
				this.SET_CALL_STATUS(false)
			}, 2000)
		},
		onHide: function(e) {
			// clearInterval(this.timer)
			this.SET_CALL_STATUS(true)
			console.log('App Hide')
		},
		methods: {
			...mapMutations('tabbarPopup', ['SET_TABBAR_POPUP_SHOW', 'SET_CALL_STATUS']),
			
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";
	@import "./static/iconfont/iconfont.css";


	@font-face {
		font-family: "Microsoft YaHei";
		font-weight: normal;
		font-style: normal;
	}

	@font-face {
		font-family: hwfont;
		src: url('/static/font/HarmonyOS_Sans_SC_Medium.ttf')
	}

	// @font-face {
	// 	font-family: 'HKGrotesk-Medium-7';
	// 	src: url(/assets/styles/HKGrotesk-Medium-7.otf)
	// }
	.chooseImage_btn {
		padding: 20rpx;
		text-align: center;
		border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);

		&:nth-child(2) {}
	}

	.popup {
		padding: 30rpx;

		.popup_title {
			text-align: center;
			font-size: 36rpx;
			font-weight: bold;
		}

		.popup_content {
			padding: 30rpx 0;
		}

		.popup_btn {
			border-radius: 10rpx;
			margin-top: 20rpx;
		}
	}

	page {
		background-color: #fafafa;
		height: 100%;
		// font-family: 'HKGrotesk-Medium-7';
		--safe-area-inset-top: 0rpx;
		--safe-area-inset-right: 0rpx;
		--safe-area-inset-bottom: 0rpx;
		font-size: 28rpx;
		// font-family: hwfont;
		color: #3C3C3D;
	}

	::v-deep.uni-page-head {
		background: #fff !important;
	}

	::v-deep .uni-page-head__title {
		font-weight: 400 !important;
		font-family: hwfont;
	}

	.grayscale {
		-webkit-filter: grayscale(100%);
		-moz-filter: grayscale(100%);
		-ms-filter: grayscale(100%);
		-o-filter: grayscale(100%);
		filter: grayscale(100%);
		filter: gray;
	}

	.text_number {
		font-family: hwfont;
	}

	@supports (top: constant(safe-area-inset-top)) {
		page {
			--safe-area-inset-top: constant(safe-area-inset-top);
			--safe-area-inset-right: constant(safe-area-inset-right);
			--safe-area-inset-bottom: constant(safe-area-inset-bottom);
			--safe-area-inset-left: constant(safe-area-inset-left);
		}
	}

	@supports (top: env(safe-area-inset-top)) {
		page {
			--safe-area-inset-top: env(safe-area-inset-top);
			--safe-area-inset-right: env(safe-area-inset-right);
			--safe-area-inset-bottom: env(safe-area-inset-bottom);
			--safe-area-inset-left: env(safe-area-inset-left);
		}
	}
</style>